home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: 2002
- // Author: DRB
- //
- // Description: Create a pond, or fluid with a water surface simulation
- //
-
- proc string createWaterSurfaceFluid( float $pondSize )
- {
- create2DFluid 100 100 $pondSize $pondSize ($pondSize*.15);
- string $fSel[] = `ls -sl -dag`;
- string $fluid = $fSel[0];
-
- rename $fluid "Pond#";
- $fSel = `ls -sl -dag`;
- $fluid = $fSel[0];
-
- string $fluidShape = $fSel[1];
-
- setAttr ($fluid + ".rx") -90;
- setAttr ($fluid + ".solver") 2;
- setAttr ($fluid + ".boundaryDraw") 4;
- setAttr ($fluid + ".heightField") 1;
- setAttr ($fluid + ".densityScale") 1.0;
- setAttr ($fluid + ".edgeDropoff") 0.008;
- setAttr ($fluid + ".velocityDamp") 0.02;
- setAttr ($fluid + ".transparency") -type double3 0 0 0;
- setAttr ($fluid + ".specularColor") -type double3 0.95868 0.95868 0.95868;
- setAttr ($fluid + ".surfaceRender") 1;
- setAttr ($fluid + ".colorInput") 6;
- setAttr ($fluid + ".incandescenceInput") 5;
- setAttr ($fluid + ".incandescence[0].incandescence_Position") 0.3;
- setAttr ($fluid + ".incandescence[1].incandescence_Color") -type double3 0.061628 0.199391 0.217;
- setAttr ($fluid + ".incandescence[1].incandescence_Position") 0.5;
- setAttr ($fluid + ".incandescence[1].incandescence_Interp") 1;
-
- setAttr ($fluid + ".incandescence[2].incandescence_Color") -type double3 0.249288 0.408 0.342373;
- setAttr ($fluid + ".incandescence[2].incandescence_Position") 1.0;
- setAttr ($fluid + ".incandescence[2].incandescence_Interp") 1;
-
- setAttr ($fluid + ".color[0].color_Color") -type double3 0.089646 0.189544 0.446;
- setAttr ($fluid + ".color[1].color_Color") -type double3 0.630252 0.732 0.685213;
- setAttr ($fluid + ".color[1].color_Position") 0.5;
- setAttr ($fluid + ".color[1].color_Interp") 1;
- setAttr ($fluid + ".color[2].color_Color") -type double3 1.0 1.0 1.0;
- setAttr ($fluid + ".color[2].color_Position") 1.0;
- setAttr ($fluid + ".color[2].color_Interp") 1;
- setAttr ($fluid + ".environment[0].environment_Color") -type double3 0.042744 0.108427 0.548;
-
- setAttr ($fluid + ".environment[1].environment_Color") -type double3 0.08708 0.156017 0.28;
- setAttr ($fluid + ".environment[1].environment_Position") 0.45;
- setAttr ($fluid + ".environment[1].environment_Interp") 1;
-
- setAttr ($fluid + ".environment[2].environment_Color") -type double3 0.7905 0.93 0.871433;
- setAttr ($fluid + ".environment[2].environment_Position") 0.6;
- setAttr ($fluid + ".environment[2].environment_Interp") 1;
-
- setAttr ($fluid + ".environment[3].environment_Color") -type double3 0.140119 0.215084 0.541;
- setAttr ($fluid + ".environment[3].environment_Position") 1.0;
- setAttr ($fluid + ".environment[3].environment_Interp") 1;
-
- return( $fluidShape );
- }
-
- global proc createPond( float $pondSize )
- {
- if( !fluidEditLicenseFound() ) {
- error( "Fluid license not found." );
- return;
- }
- string $shape = createWaterSurfaceFluid( $pondSize );
- string $shapeHelp = ("This 2D fluid uses a spring mesh height model to"
- +" model a water surface. One can generate wakes into it by using fluid"
- +" emitters. Negative density emission will push the surface down"
- +" while positive values will push the surface up. This surface"
- +" renders as a raytraced volumetric surface. Waves that are larger"
- +" than the vertical fluid bounds will be clipped. The size parameter"
- +" can be increased to provide a larger range of travel, although the"
- +" volume rendering may be a bit slower.");
-
- addAttr -sn nts -ln notes -dt "string" $shape;
- setAttr -type "string" ($shape + ".notes") $shapeHelp;
- }
-